{% extends 'djangobb_forum/base.html' %}
{% load forum_extras %}
{% load i18n %}

{% block content %}
<div class="linkst">
	<div class="inbox">
		<p class="pagelink conl">{# pagination #}</p>
		<div class="clearer"></div>
	</div>
</div>

<form method="POST">
{% csrf_token %}
<div class="blockform">
	<h2><span>{% trans "Reputation of the user" %} {{ profile.user }}&nbsp;&nbsp;<strong>[+{{ profile.reply_count_plus|default_if_none:"0" }} / -{{ profile.reply_count_minus|default_if_none:"0" }}] &nbsp;</strong></span></h2>
	<div class="box">
		<div class="inbox">
			<table cellspacing="0">
			<thead>
				<tr>
				<th class="tc3" style="width: 15%;">{% trans "From user" %}</th>
				<th class="tc3" style="width: 15%;">{% trans "For post in topic" %}</th>
				<th class="tc3" style="width: 35%;">{% trans "Reason" %}</th>
				<th class="tc3" style="width: 10%; text-align: center;">{% trans "Estimation" %}</th>
				<th class="tc3" style="width: 15%;">{% trans "Date" %}</th>
				{% if request.user.is_superuser %}
					<th class="tc3" style="width: 10%;">{% trans "Delete" %}</th>
				{% endif %}
				</tr>
			</thead>
				<tbody>
				{% for reputation in reputations %}
					<tr>
						<td><a href="{% url djangobb:reputation reputation.from_user %}">{{ reputation.from_user }}</a></td>
						<td><a href="{{ reputation.post.get_absolute_url }}">{{ reputation.post.topic }}</a></td>
						<td>{{ reputation.reason }}</td>
						<td style="text-align: center;">
						{% if reputation.sign == 1 %}
							<img src="{{ STATIC_URL }}djangobb_forum/img/reputation/warn_add.gif" alt="+" border="0">
						{% else %}
							<img src="{{ STATIC_URL }}djangobb_forum/img/reputation/warn_minus.gif" alt="+" border="0">
						{% endif %}
						</td>
						<td>{% forum_time reputation.time %}</td>
						{% if request.user.is_superuser %}
							<td style="text-align: center;"><input type="checkbox" name="reputation_id" value="{{ reputation.id }}"></td>
						{% endif %}
					</tr>
				{% endfor %}
				</tbody>
			</table>
		</div>
	</div>
</div>

<div class="clearer"></div>
<div class="postlinksb">
	<div class="inbox">
		<p class="pagelink conl">{# pagination #}</p>
		<p class="postlink conr">
			{% if request.user.is_superuser %}
				<input name="del_reputation" value="Delete" onclick="return confirm('{% trans "Are you sure" %}?')" type="submit">
			{% endif %}
			<a href="javascript:history.go(-1)">{% trans "Go back" %}</a>
		</p>
		
		<div class="clearer"></div>
	</div>
</div>
</form>
{% endblock %}

{% block controls %}
{% endblock %}
